<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Recast-入门 | Abel&#39;Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Recast-入门Recast-Navigation 在做3d游戏的时候，用于做导航的在Unity3D、Unreal Engine都可以使用。当前使用 unreal 4.25 1. Recast工程介绍RecastNavigation 是一个的导航寻路工具集，它包括了几个子集： 1234Recast：负责根据提供的模型生成导航网格。Detour：利用导航网格做寻路操作。这里的导航网格可以是 Rec">
<meta property="og:type" content="article">
<meta property="og:title" content="Recast-入门">
<meta property="og:url" content="http://example.com/2021/07/28/2020/2020-11-22-Recast/index.html">
<meta property="og:site_name" content="Abel&#39;Blog">
<meta property="og:description" content="Recast-入门Recast-Navigation 在做3d游戏的时候，用于做导航的在Unity3D、Unreal Engine都可以使用。当前使用 unreal 4.25 1. Recast工程介绍RecastNavigation 是一个的导航寻路工具集，它包括了几个子集： 1234Recast：负责根据提供的模型生成导航网格。Detour：利用导航网格做寻路操作。这里的导航网格可以是 Rec">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://s3.ax1x.com/2020/12/22/rr16JS.png">
<meta property="og:image" content="https://s3.ax1x.com/2020/12/22/rrHrJs.png">
<meta property="og:image" content="https://s3.ax1x.com/2020/12/22/rrHsWn.png">
<meta property="og:image" content="https://s3.ax1x.com/2020/12/22/rrHcQ0.png">
<meta property="og:image" content="https://s3.ax1x.com/2021/02/02/ymUU0I.gif">
<meta property="og:image" content="https://s3.ax1x.com/2021/02/02/ymUNnA.gif">
<meta property="og:image" content="https://s3.ax1x.com/2021/02/02/ymUz9O.gif">
<meta property="article:published_time" content="2021-07-28T03:33:01.220Z">
<meta property="article:modified_time" content="2021-07-26T02:50:01.600Z">
<meta property="article:author" content="Abel Sean">
<meta property="article:tag" content="Game">
<meta property="article:tag" content="recast">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s3.ax1x.com/2020/12/22/rr16JS.png">
  
    <link rel="alternate" href="/atom.xml" title="Abel&#39;Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Abel&#39;Blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-2020/2020-11-22-Recast" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2021/07/28/2020/2020-11-22-Recast/" class="article-date">
  <time datetime="2021-07-28T03:33:01.220Z" itemprop="datePublished">2021-07-28</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Recast-入门
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="Recast-入门"><a href="#Recast-入门" class="headerlink" title="Recast-入门"></a>Recast-入门</h1><p>Recast-Navigation 在做3d游戏的时候，用于做导航的在Unity3D、Unreal Engine都可以使用。当前使用 unreal 4.25</p>
<h2 id="1-Recast工程介绍"><a href="#1-Recast工程介绍" class="headerlink" title="1. Recast工程介绍"></a>1. Recast工程介绍</h2><p>RecastNavigation 是一个的导航寻路工具集，它包括了几个子集：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Recast：负责根据提供的模型生成导航网格。</span><br><span class="line">Detour：利用导航网格做寻路操作。这里的导航网格可以是 Recast 生成的，也可以是其他工具生成的。</span><br><span class="line">DetourCrowd：提供了群体寻路行为的功能。</span><br><span class="line">Recast Demo：一个很完善的 Demo，基本上将 Recast 、 Detour 提供的功能都很好地展现了出来。弄懂了这个 Demo 的功能，基本也就了解了 RecastNavigation 究竟可以干什么事。</span><br></pre></td></tr></table></figure>

<p>Recast先从几何体构造素模，然后在其上投射导航网格。此过程包括三个步骤：</p>
<ol>
<li>创建素模(voxel mold)；</li>
</ol>
<p>通过将三角形栅格化为多层高度场，从输入三角形网格构建体素模具。然后将一些简单的滤镜应用到模具上，以修剪角色无法移动的位置。</p>
<ol start="2">
<li>将素模划分成简单区域(region)；</li>
</ol>
<p>模具描述的可行走区域分为简单的2D覆盖区域。 生成的区域仅具有不重叠的轮廓，这大大简化了过程的最后一步。</p>
<ol start="3">
<li>将区域转换成多边形(polygons)；</li>
</ol>
<p>通过首先跟踪边界，然后对其进行简化，可以将导航多边形从区域中剥离。 最终将生成的多边形转换为凸多边形，这使它们非常适合该级的寻路和空间推理。</p>
<blockquote>
<p>注：凸多边形的内角均小于或等于180°，边数为n（n属于Z且n大于2）的凸多边形内角和为（n－2）×180°，但任意凸多边形外角和均为360°，并可通过反证法证明凸多边形内角中锐角的个数不能多于3个。</p>
</blockquote>
<p>尝试将unreal engine 里面的地图导出成detour能使用的导航网格：</p>
<p>再 UNREAL ENGINE 里面地图是*.umap文件。我们用UE打开之后，在菜单栏里面操作： Windows-&gt;导出NavMesh。这个步骤将会生成一个*.obj文件。这种文件其实是一种文本文件，描述了3D对象模型信息。Unity3D也一样能导出这样的文件。此过程将会生成某个尺寸的模型文件。</p>
<p>我们移植了一些Detour的代码，编写了一个程序 RecastCreator。这个程序能将*.obj文件导出成为一个binary文件。后续就直接使用binary文件来做导航操作。</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br></pre></td><td class="code"><pre><span class="line">PS D:\work\trunk\refer\recastnavigation\RecastDemo\Bin\Meshes&gt; .\RecastCreator.exe -cfg -out t3.obj t3.region</span><br><span class="line">----- Create Cfg -----</span><br><span class="line">cellsize = <span class="number">0</span>.<span class="number">30</span></span><br><span class="line">cellheight = <span class="number">0</span>.<span class="number">20</span></span><br><span class="line">agentheight = <span class="number">2</span></span><br><span class="line">agentradius = <span class="number">0</span>.<span class="number">6</span></span><br><span class="line">agentmaxclimb = <span class="number">0</span>.<span class="number">9</span></span><br><span class="line">agentmaxslope = <span class="number">45</span></span><br><span class="line">regionminsize = <span class="number">8</span></span><br><span class="line">regionmergesize = <span class="number">20</span></span><br><span class="line">edgemaxlen = <span class="number">12</span></span><br><span class="line">edgemaxerror = <span class="number">1</span>.<span class="number">3</span></span><br><span class="line">vertsperpoly = <span class="number">6</span></span><br><span class="line">detailsampledist = <span class="number">6</span></span><br><span class="line">detailsamplemaxerror = <span class="number">1</span></span><br><span class="line">partitiontype = <span class="number">1</span></span><br><span class="line">tilesize = <span class="number">0</span></span><br><span class="line">----- End -----</span><br><span class="line">PS D:\work\trunk\refer\recastnavigation\RecastDemo\Bin\Meshes&gt; .\RecastCreator.exe -out t3.obj t3.region</span><br><span class="line">----- Create Bin -----</span><br><span class="line">Building navigation:</span><br><span class="line"> - <span class="number">1028</span> x <span class="number">1135</span> cells</span><br><span class="line"> - <span class="number">525</span>.<span class="number">2</span>K verts, <span class="number">306</span>.<span class="number">2</span>K tris</span><br><span class="line">Build Times</span><br><span class="line">- Rasterize:    <span class="number">176</span>.<span class="number">99</span>ms        (<span class="number">24</span>.<span class="number">5</span>%)</span><br><span class="line">- Build <span class="built_in">Compact</span>:        <span class="number">39</span>.<span class="number">54</span>ms (<span class="number">5</span>.<span class="number">5</span>%)</span><br><span class="line">- Filter Border:        <span class="number">29</span>.<span class="number">55</span>ms (<span class="number">4</span>.<span class="number">1</span>%)</span><br><span class="line">- Filter Walkable:      <span class="number">5</span>.<span class="number">15</span>ms  (<span class="number">0</span>.<span class="number">7</span>%)</span><br><span class="line">- Erode Area:   <span class="number">19</span>.<span class="number">18</span>ms (<span class="number">2</span>.<span class="number">7</span>%)</span><br><span class="line">- Median Area:  <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Mark Box Area:        <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Mark Convex Area:     <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Mark Cylinder Area:   <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Build Distance Field: <span class="number">29</span>.<span class="number">01</span>ms (<span class="number">4</span>.<span class="number">0</span>%)</span><br><span class="line">    - Distance: <span class="number">19</span>.<span class="number">88</span>ms (<span class="number">2</span>.<span class="number">7</span>%)</span><br><span class="line">    - Blur:     <span class="number">8</span>.<span class="number">95</span>ms  (<span class="number">1</span>.<span class="number">2</span>%)</span><br><span class="line">- Build Regions:        <span class="number">105</span>.<span class="number">62</span>ms        (<span class="number">14</span>.<span class="number">6</span>%)</span><br><span class="line">    - Watershed:        <span class="number">97</span>.<span class="number">48</span>ms (<span class="number">13</span>.<span class="number">5</span>%)</span><br><span class="line">      - Expand: <span class="number">35</span>.<span class="number">47</span>ms (<span class="number">4</span>.<span class="number">9</span>%)</span><br><span class="line">      - <span class="built_in">Find</span> Basins:    <span class="number">2</span>.<span class="number">93</span>ms  (<span class="number">0</span>.<span class="number">4</span>%)</span><br><span class="line">    - Filter:   <span class="number">6</span>.<span class="number">76</span>ms  (<span class="number">0</span>.<span class="number">9</span>%)</span><br><span class="line">- Build Layers: <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Build Contours:       <span class="number">13</span>.<span class="number">14</span>ms (<span class="number">1</span>.<span class="number">8</span>%)</span><br><span class="line">    - Trace:    <span class="number">8</span>.<span class="number">87</span>ms  (<span class="number">1</span>.<span class="number">2</span>%)</span><br><span class="line">    - Simplify: <span class="number">2</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">3</span>%)</span><br><span class="line">- Build Polymesh:       <span class="number">6</span>.<span class="number">09</span>ms  (<span class="number">0</span>.<span class="number">8</span>%)</span><br><span class="line">- Build Polymesh Detail:        <span class="number">286</span>.<span class="number">67</span>ms        (<span class="number">39</span>.<span class="number">6</span>%)</span><br><span class="line">- Merge Polymeshes:     <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">- Merge Polymesh Details:       <span class="number">0</span>.<span class="number">00</span>ms  (<span class="number">0</span>.<span class="number">0</span>%)</span><br><span class="line">=== TOTAL:      <span class="number">723</span>.<span class="number">73</span>ms</span><br><span class="line">&gt;&gt; Polymesh: <span class="number">2552</span> vertices  <span class="number">1153</span> polygons</span><br><span class="line"></span><br><span class="line">----- End -----</span><br></pre></td></tr></table></figure>

<h2 id="2-环境搭建"><a href="#2-环境搭建" class="headerlink" title="2.环境搭建"></a>2.环境搭建</h2><h3 id="2-1-编译recastnavigation"><a href="#2-1-编译recastnavigation" class="headerlink" title="2.1.编译recastnavigation"></a>2.1.编译recastnavigation</h3><table>
<thead>
<tr>
<th align="left">工具名称</th>
<th align="left">版本信息</th>
</tr>
</thead>
<tbody><tr>
<td align="left">visualstudio2019</td>
<td align="left">16.8.3</td>
</tr>
<tr>
<td align="left">CMake</td>
<td align="left">3.19.0-rc1</td>
</tr>
<tr>
<td align="left">premake</td>
<td align="left">5.0</td>
</tr>
</tbody></table>
<h4 id="2-1-1-下载地址"><a href="#2-1-1-下载地址" class="headerlink" title="2.1.1.下载地址"></a>2.1.1.下载地址</h4><table>
<thead>
<tr>
<th align="left">名称</th>
<th align="left">下载地址</th>
</tr>
</thead>
<tbody><tr>
<td align="left">SDL</td>
<td align="left"><a target="_blank" rel="noopener" href="https://www.libsdl.org/release/SDL2-devel-2.0.14-VC.zip">SDL2-devel-2.0.14-VC.zip</a></td>
</tr>
<tr>
<td align="left">premake</td>
<td align="left"><a target="_blank" rel="noopener" href="https://premake.github.io/">premake.github</a></td>
</tr>
</tbody></table>
<h4 id="2-1-2-准备好SDL2的dll"><a href="#2-1-2-准备好SDL2的dll" class="headerlink" title="2.1.2.准备好SDL2的dll"></a>2.1.2.准备好SDL2的dll</h4><p>将下载的SDL2.dll文件放入到子目录中：</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">recastnavigation\RecastDemo\Contrib\SDL\lib\x86\SDL2.dll</span><br></pre></td></tr></table></figure>

<p>使用CMake将SDL2编译出来。在windows里面，我这里都是使用<code>32位</code>编译的。</p>
<p>配置下列的环境变量：</p>
<table>
<thead>
<tr>
<th align="left">变量名</th>
<th align="left">位置</th>
</tr>
</thead>
<tbody><tr>
<td align="left">SDL_PATH</td>
<td align="left">D:\work\trunk\refer\recastnavigation\RecastDemo\Contrib\SDL</td>
</tr>
<tr>
<td align="left">SDL2_INCLUDE_DIR</td>
<td align="left">D:\work\trunk\refer\SDL\SDL2-2.0.14\SDL2-2.0.14\include</td>
</tr>
<tr>
<td align="left">SDL2_LIBRARY</td>
<td align="left">D:\work\trunk\refer\SDL\SDL2-2.0.14\SDL2-2.0.14\build\Debug</td>
</tr>
<tr>
<td align="left">SDL2_SDLMAIN_LIBRARY</td>
<td align="left">D:\work\trunk\refer\SDL\SDL2-2.0.14\SDL2-2.0.14\build\Debug</td>
</tr>
</tbody></table>
<h4 id="2-1-3-使用premake5生成工程文件"><a href="#2-1-3-使用premake5生成工程文件" class="headerlink" title="2.1.3.使用premake5生成工程文件"></a>2.1.3.使用premake5生成工程文件</h4><p>这个默认生成的是win32位的</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">D:\<span class="title">work</span>\<span class="title">trunk</span>\<span class="title">refer</span>\<span class="title">recastnavigation</span>\<span class="title">RecastDemo</span>&gt;&quot;<span class="title">premake5</span>&quot; <span class="title">vs2019</span></span></span><br><span class="line"><span class="function"><span class="title">Building</span> <span class="title">configurations</span>...</span></span><br><span class="line"><span class="function"><span class="title">Running</span> <span class="title">action</span> &#x27;<span class="title">vs2019</span>&#x27;...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">recastnavigation.sln</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DebugUtils.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DebugUtils.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Detour.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Detour.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DetourCrowd.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DetourCrowd.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DetourTileCache.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">DetourTileCache.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Recast.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Recast.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">RecastDemo.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">RecastDemo.vcxproj.user</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">RecastDemo.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Tests.vcxproj</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Tests.vcxproj.user</span>...</span></span><br><span class="line"><span class="function"><span class="title">Generated</span> <span class="title">Build</span>/<span class="title">vs2019</span>/<span class="title">Tests.vcxproj.filters</span>...</span></span><br><span class="line"><span class="function"><span class="title">Done</span> (225<span class="title">ms</span>).</span></span><br></pre></td></tr></table></figure>

<p>工程属性-&gt;生成事件-&gt;命令行；将下面部分去掉</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1</span>&gt;找不到文件 - SDL2.dll</span><br><span class="line"><span class="number">1</span>&gt;C:\Program Files (x86)\Microsoft Visual Studio\<span class="number">2019</span>\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(<span class="number">153</span>,<span class="number">5</span>): error MSB3073: 命令“<span class="keyword">IF</span> <span class="keyword">EXIST</span> &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot;\ (<span class="built_in">xcopy</span> /Q /E /Y /I &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot; &quot;..\..\Bin&quot; &gt; <span class="built_in">nul</span>) <span class="keyword">ELSE</span> (<span class="built_in">xcopy</span> /Q /Y /I &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot; &quot;..\..\Bin&quot; &gt; <span class="built_in">nul</span>)</span><br><span class="line"><span class="number">1</span>&gt;C:\Program Files (x86)\Microsoft Visual Studio\<span class="number">2019</span>\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(<span class="number">153</span>,<span class="number">5</span>): error MSB3073: :VCEnd”已退出，代码为 <span class="number">4</span>。</span><br><span class="line"><span class="number">1</span>&gt;已完成生成项目“RecastDemo.vcxproj”的操作 - 失败。</span><br><span class="line"></span><br><span class="line"><span class="keyword">IF</span> <span class="keyword">EXIST</span> &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot;\ (<span class="built_in">xcopy</span> /Q /E /Y /I &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot; &quot;..\..\Bin&quot; &gt; <span class="built_in">nul</span>) <span class="keyword">ELSE</span> (<span class="built_in">xcopy</span> /Q /Y /I &quot;..\..\Contrib\SDL\lib\x86\SDL2.dll&quot; &quot;..\..\Bin&quot; &gt; <span class="built_in">nul</span>)</span><br></pre></td></tr></table></figure>

<p>自己手动将编译出来的文件复制过去。</p>
<p>RecastDemo的效果图：</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/rr16JS"><img src="https://s3.ax1x.com/2020/12/22/rr16JS.png" alt="rr16JS.png"></a></p>
<p>加载一个obj文件：</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/rrHrJs"><img src="https://s3.ax1x.com/2020/12/22/rrHrJs.png" alt="rrHrJs.png"></a></p>
<p>将obj文件的导航网格生成出来：</p>
<p>生成了之后，地图的颜色将会变化，只需要点击”Build”。有导航网格，才能去测试导航功能。</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/rrHsWn"><img src="https://s3.ax1x.com/2020/12/22/rrHsWn.png" alt="rrHsWn.png"></a></p>
<p>测试导航功能：</p>
<p>在地图上选择开始结束点；”shift+鼠标左键”</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/rrHcQ0"><img src="https://s3.ax1x.com/2020/12/22/rrHcQ0.png" alt="rrHcQ0.png"></a></p>
<h2 id="3-Recast-导航网格类型"><a href="#3-Recast-导航网格类型" class="headerlink" title="3.Recast 导航网格类型"></a>3.Recast 导航网格类型</h2><p>recastnavigation中提供了3种模式的导航网格：</p>
<h3 id="3-1-SoloMesh"><a href="#3-1-SoloMesh" class="headerlink" title="3.1.SoloMesh"></a>3.1.SoloMesh</h3><p>其中SoloMesh模式是静态的导航网格，即对场景build一次之后，将导航网格缓存起来供寻路使用，后续不再允许场景的导航信息发生变化。</p>
<p>文件头：</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> NAVMESHSET_MAGIC = <span class="string">&#x27;M&#x27;</span>&lt;&lt;<span class="number">24</span> | <span class="string">&#x27;S&#x27;</span>&lt;&lt;<span class="number">16</span> | <span class="string">&#x27;E&#x27;</span>&lt;&lt;<span class="number">8</span> | <span class="string">&#x27;T&#x27;</span>; <span class="comment">//&#x27;MSET&#x27;;</span></span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">NavMeshSetHeader</span></span></span><br><span class="line"><span class="class">&#123;</span></span><br><span class="line">    <span class="keyword">uint32_t</span> magic;</span><br><span class="line">    <span class="keyword">uint32_t</span> version;</span><br><span class="line">    <span class="keyword">uint32_t</span> numTiles;</span><br><span class="line">    dtNavMeshParams params;</span><br><span class="line">&#125;;</span><br><span class="line">    <span class="comment">// Store header.</span></span><br><span class="line">    NavMeshSetHeader header;</span><br><span class="line">    header.magic = NAVMESHSET_MAGIC;</span><br><span class="line">    header.version = NAVMESHSET_VERSION;</span><br><span class="line">    header.numTiles = <span class="number">0</span>;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="3-2-TileMesh"><a href="#3-2-TileMesh" class="headerlink" title="3.2.TileMesh"></a>3.2.TileMesh</h3><p>TileMesh也是静态的导航网格，只是与SoloMesh相比它按tile来处理地图，算是介于SoloMesh和TempObstacles之间的一种模式</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 文件名：all_tiles_navmesh.bin</span></span><br><span class="line"><span class="comment">// 文件头： TESM</span></span><br><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> NAVMESHSET_MAGIC = <span class="string">&#x27;M&#x27;</span>&lt;&lt;<span class="number">24</span> | <span class="string">&#x27;S&#x27;</span>&lt;&lt;<span class="number">16</span> | <span class="string">&#x27;E&#x27;</span>&lt;&lt;<span class="number">8</span> | <span class="string">&#x27;T&#x27;</span>; <span class="comment">//&#x27;MSET&#x27;;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 加载文件失败：</span></span><br><span class="line">dtStatus addTileStatus = m_tileCache-&gt;<span class="built_in">addTile</span>(data, tileHeader.dataSize, DT_COMPRESSEDTILE_FREE_DATA, &amp;tile);</span><br><span class="line"><span class="function"><span class="keyword">inline</span> <span class="keyword">bool</span> <span class="title">dtStatusFailed</span><span class="params">(dtStatus status)</span></span></span><br><span class="line"><span class="function"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> DT_FAILURE </span>= <span class="number">1u</span> &lt;&lt; <span class="number">31</span>;            <span class="comment">// Operation failed.</span></span><br><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> DT_WRONG_MAGIC = <span class="number">1</span> &lt;&lt; <span class="number">0</span>;        <span class="comment">// Input data is not recognized.</span></span><br><span class="line">    <span class="keyword">if</span> (header-&gt;magic != DT_TILECACHE_MAGIC)</span><br><span class="line">        <span class="keyword">return</span> DT_FAILURE | DT_WRONG_MAGIC;</span><br><span class="line"></span><br><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> DT_TILECACHE_MAGIC = <span class="string">&#x27;D&#x27;</span>&lt;&lt;<span class="number">24</span> | <span class="string">&#x27;T&#x27;</span>&lt;&lt;<span class="number">16</span> | <span class="string">&#x27;L&#x27;</span>&lt;&lt;<span class="number">8</span> | <span class="string">&#x27;R&#x27;</span>; <span class="comment">///&lt; &#x27;DTLR&#x27;;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Sample::<span class="built_in">saveAll</span>(<span class="string">&quot;all_tiles_navmesh.bin&quot;</span>, m_navMesh);</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="3-3-TempObstacles"><a href="#3-3-TempObstacles" class="headerlink" title="3.3.TempObstacles"></a>3.3.TempObstacles</h3><p>TempObstacles模式可以支持向场景中动态添加或移除预设形状的阻挡物，导航网格也会随之更新（不过只支持添加阻挡物，而不支持添加新的可行走区域）在处理动态阻挡时，由于单个阻挡对地图的影响区域是有限的，所以会采用将地图切割成多个固定大小的tile，以tile为单位进行网格的生成。这样在添加或移除阻挡时，只需要处理与阻挡相交的tile，而不需要处理整个地图。</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> TILECACHESET_MAGIC = <span class="string">&#x27;T&#x27;</span> &lt;&lt; <span class="number">24</span> | <span class="string">&#x27;S&#x27;</span> &lt;&lt; <span class="number">16</span> | <span class="string">&#x27;E&#x27;</span> &lt;&lt; <span class="number">8</span> | <span class="string">&#x27;T&#x27;</span>; <span class="comment">//&#x27;TSET&#x27;;</span></span><br></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://github.com/ZLSYMDJ/NavMeshDemo">参考NavMeshDemo源码</a></p>
<h3 id="3-4-导出Mesh的源码分析"><a href="#3-4-导出Mesh的源码分析" class="headerlink" title="3.4.导出Mesh的源码分析"></a>3.4.导出Mesh的源码分析</h3><p>参考官方的代码-RecastDemo部分，在右边的上部，”Sample”中下拉菜单中选择的三类(Solo Mesh、Tile Mesh、Temp Obstacles)导出方式都看明白。</p>
<p>3种导出方式：</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">Sample* <span class="title">createSolo</span><span class="params">()</span> </span>&#123; <span class="keyword">return</span> <span class="keyword">new</span> <span class="built_in">Sample_SoloMesh</span>(); &#125;</span><br><span class="line"><span class="function">Sample* <span class="title">createTile</span><span class="params">()</span> </span>&#123; <span class="keyword">return</span> <span class="keyword">new</span> <span class="built_in">Sample_TileMesh</span>(); &#125;</span><br><span class="line"><span class="function">Sample* <span class="title">createTempObstacle</span><span class="params">()</span> </span>&#123; <span class="keyword">return</span> <span class="keyword">new</span> <span class="built_in">Sample_TempObstacles</span>(); &#125;</span><br></pre></td></tr></table></figure>

<p>“Build”按钮将会调用</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (<span class="built_in">imguiButton</span>(<span class="string">&quot;Build&quot;</span>))</span><br><span class="line">&#123;</span><br><span class="line">    ctx.<span class="built_in">resetLog</span>();</span><br><span class="line">    <span class="keyword">if</span> (!sample-&gt;<span class="built_in">handleBuild</span>())</span><br><span class="line">    &#123;</span><br><span class="line">        showLog = <span class="literal">true</span>;</span><br><span class="line">        logScroll = <span class="number">0</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    ctx.<span class="built_in">dumpLog</span>(<span class="string">&quot;Build log %s:&quot;</span>, meshName.<span class="built_in">c_str</span>());</span><br><span class="line">    </span><br><span class="line">    <span class="comment">// Clear test.</span></span><br><span class="line">    <span class="keyword">delete</span> test;</span><br><span class="line">    test = <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>“Save”按钮将会把生成的网格存储到</p>
<table>
<thead>
<tr>
<th align="left">类型</th>
<th align="left">文件</th>
<th align="left">大小</th>
</tr>
</thead>
<tbody><tr>
<td align="left">Solo</td>
<td align="left">solo_navmesh.bin</td>
<td align="left">240kb</td>
</tr>
<tr>
<td align="left">Tile</td>
<td align="left">all_tiles_navmesh.bin</td>
<td align="left">479kb</td>
</tr>
<tr>
<td align="left">TempObstacle</td>
<td align="left">all_tiles_tilecache.bin</td>
<td align="left">479kb</td>
</tr>
</tbody></table>
<p>导出时候需要设置的参数：</p>
<table>
<thead>
<tr>
<th align="left">变量</th>
<th align="left">基本信息</th>
<th align="left">备注</th>
</tr>
</thead>
<tbody><tr>
<td align="left">cellsize</td>
<td align="left">方块尺寸</td>
<td align="left">0.3</td>
</tr>
<tr>
<td align="left">cellheight</td>
<td align="left">方块高度</td>
<td align="left">0.2</td>
</tr>
<tr>
<td align="left">agentheight</td>
<td align="left">walkableHeight = agentheight/ cellheight</td>
<td align="left">2</td>
</tr>
<tr>
<td align="left">agentradius</td>
<td align="left">walkableClimb = agentradius/ cellheight</td>
<td align="left">0.6</td>
</tr>
<tr>
<td align="left">agentmaxclimb</td>
<td align="left">walkableRadius = agentmaxclimb/ cellheight</td>
<td align="left">0.9</td>
</tr>
<tr>
<td align="left">agentmaxslope</td>
<td align="left">walkableSlopeAngle = agentmaxslope</td>
<td align="left">45</td>
</tr>
<tr>
<td align="left">regionminsize</td>
<td align="left">minRegionArea = regionminsize*regionminsize</td>
<td align="left">8</td>
</tr>
<tr>
<td align="left">regionmergesize</td>
<td align="left">mergeRegionArea = regionmergesize*regionmergesize</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">edgemaxlen</td>
<td align="left">maxEdgeLen = edgemaxlen/cellheight</td>
<td align="left">12</td>
</tr>
<tr>
<td align="left">edgemaxerror</td>
<td align="left">maxSimplificationError = edgemaxerror</td>
<td align="left">1.3</td>
</tr>
<tr>
<td align="left">vertsperpoly</td>
<td align="left">maxVertsPerPoly</td>
<td align="left">6</td>
</tr>
<tr>
<td align="left">detailsampledist</td>
<td align="left">detailSampleDist = detailsampledist &lt; 0.9f ? 0 : cellsize * detailsampledist;</td>
<td align="left">6</td>
</tr>
<tr>
<td align="left">detailsamplemaxerror</td>
<td align="left">detailSampleMaxError = cellheight * detailsamplemaxerror</td>
<td align="left">1</td>
</tr>
<tr>
<td align="left">partitiontype</td>
<td align="left"></td>
<td align="left">1</td>
</tr>
<tr>
<td align="left">tilesize</td>
<td align="left"></td>
<td align="left">48</td>
</tr>
</tbody></table>
<p><a target="_blank" rel="noopener" href="http://www.stevefsp.org/projects/rcndoc/prod/structrcConfig.html">RecastNavigation-rcConfig文档</a></p>
<p>cellsize</p>
<p>方块尺寸（x,z平面上），和平面有关系。较低的值将产生较高质量的导航，但是图形扫描较慢。在文档里面记作 [vx]</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/ymUU0I"><img src="https://s3.ax1x.com/2021/02/02/ymUU0I.gif" alt="ymUU0I.gif"></a></p>
<p>cellheight</p>
<p>方块高度（y高程），和爬坡有关系。记录计算攀爬仰角，攀爬的高度，计算边缘都需要这个。官方文档里面记作 [vy]</p>
<p>agentheight</p>
<hr>
<p>minRegionArea</p>
<p>最小孤岛所容纳的cell数目；</p>
<p>任意区域小于指定的数目，将会标记成无法行走。这个东西通常用于去删除无用几何体，比如桌子的顶部，盒子的顶部等等。</p>
<p>值域：[Limit: &gt;=0] 作用域：[Units: vx]，vx代表平面；</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/ymUNnA"><img src="https://s3.ax1x.com/2021/02/02/ymUNnA.gif" alt="ymUNnA.gif"></a></p>
<p>mergeRegionArea</p>
<p>如果有可能性的话，任意区域如果cell的数目小于它，将会被融合到比它大的区域里面。</p>
<p>值域：[Limit: &gt;=0] 作用域：[Units: vx]</p>
<p>edgemaxlen</p>
<p>沿网格边界的轮廓边缘的最大允许长度。 [Limit: &gt;=0] [Units: vx].</p>
<p>这个将会让边缘更加趋于直线。如果想关闭这个功能将值设置成0。</p>
<p><a target="_blank" rel="noopener" href="https://imgchr.com/i/ymUz9O"><img src="https://s3.ax1x.com/2021/02/02/ymUz9O.gif" alt="ymUz9O.gif"></a></p>
<p>partitiontype</p>
<p>分区方式</p>
<p>Watershed 分水岭方式</p>
<p>enum SamplePartitionType SAMPLE_PARTITION_WATERSHED = 0</p>
<p>Monotone 单调方式</p>
<p>enum SamplePartitionType SAMPLE_PARTITION_MONOTONE = 1</p>
<p>Layers 分层方式</p>
<p>enum SamplePartitionType SAMPLE_PARTITION_LAYERS = 2</p>
<p>原文释义：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">Partition the heightfield so that we can use simple algorithm later to triangulate the walkable areas.</span><br><span class="line">There are 3 martitioning methods, each with some pros and cons:</span><br><span class="line">1) Watershed partitioning</span><br><span class="line">  - the classic Recast partitioning</span><br><span class="line">  - creates the nicest tessellation</span><br><span class="line">  - usually slowest</span><br><span class="line">  - partitions the heightfield into nice regions without holes or overlaps</span><br><span class="line">  - the are some corner cases where this method creates produces holes and overlaps</span><br><span class="line">     - holes may appear when a small obstacles is close to large open area (triangulation can handle this)</span><br><span class="line">     - overlaps may occur if you have narrow spiral corridors (i.e stairs), this make triangulation to fail</span><br><span class="line">  * generally the best choice if you precompute the nacmesh, use this if you have large open areas</span><br><span class="line">2) Monotone partioning</span><br><span class="line">  - fastest</span><br><span class="line">  - partitions the heightfield into regions without holes and overlaps (guaranteed)</span><br><span class="line">  - creates long thin polygons, which sometimes causes paths with detours</span><br><span class="line">  * use this if you want fast navmesh generation</span><br><span class="line">3) Layer partitoining</span><br><span class="line">  - quite fast</span><br><span class="line">  - partitions the heighfield into non-overlapping regions</span><br><span class="line">  - relies on the triangulation code to cope with holes (thus slower than monotone partitioning)</span><br><span class="line">  - produces better triangles than monotone partitioning</span><br><span class="line">  - does not have the corner cases of watershed partitioning</span><br><span class="line">  - can be slow and create a bit ugly tessellation (still better than monotone)</span><br><span class="line">    if you have large open areas with small obstacles (not a problem if you use tiles)</span><br><span class="line">  * good choice to use for tiled navmesh with medium and small sized tiles</span><br></pre></td></tr></table></figure>

<p>tilesize</p>
<p>每块tile再xz平面上的size。[Limit: &gt;= 0] [Units: vx].</p>
<p>这个值旨在编译出多tile mesh的时候生效（temp obstacles/tiles）。</p>
<h2 id="4-包围盒分类"><a href="#4-包围盒分类" class="headerlink" title="4.包围盒分类"></a>4.包围盒分类</h2><h3 id="4-1-AABB"><a href="#4-1-AABB" class="headerlink" title="4.1.AABB"></a>4.1.AABB</h3><p>AABB算法的全称是 - axis aligned bounding box (轴对齐-边界盒)AABB 包围盒是与坐标轴对齐的包围盒, 简单性好, 紧密性较差。</p>
<h3 id="4-2-OBB"><a href="#4-2-OBB" class="headerlink" title="4.2.OBB"></a>4.2.OBB</h3><p>OBB 包围盒: OBB（oriented bounding box 方向矩形边界框） 碰撞检測方法紧密性是较好的, 可以大大降低參与相交測试的包围盒的数目, 因此整体性能要优于AABB 和包围球, 而且实时性程度较高。</p>
<h2 id="阅读-Export-Recast-Navigation-Data-from-UE4"><a href="#阅读-Export-Recast-Navigation-Data-from-UE4" class="headerlink" title="阅读 Export Recast Navigation Data from UE4"></a>阅读 Export Recast Navigation Data from UE4</h2><p>Library: <code>ue-recast-detour</code>这个是从 UE 代码中抽取出的 <code>recast detour</code> 库，在 UE 源码的路径下为 Runtime/Navmesh/Detour，主要目的是保证 UE 客户端与外部服务器的验证方法一致。只将solo方式的导航。</p>
<p>其实在<code>UnrealEngine4</code>的源代码中是有一份<code>NavigationSystem</code>，<code>Navmesh</code>。<a target="_blank" rel="noopener" href="https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Source/Runtime/Navmesh">github-UE4-Navmesh</a>。可以直接在ue4的引擎代码里面找到动态阻挡相关的逻辑。</p>
<h2 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h2><ul>
<li>[1] <a target="_blank" rel="noopener" href="https://github.com/recastnavigation/recastnavigation">recastnavigation</a></li>
<li>[2] <a target="_blank" rel="noopener" href="https://premake.github.io/download.html#v5">premake</a></li>
<li>[3] <a target="_blank" rel="noopener" href="https://www.libsdl.org/download-2.0.php">SDL</a></li>
<li>[4] <a target="_blank" rel="noopener" href="http://masagroup.github.io/recastdetour/index.html">recastdetour手册</a></li>
<li>[5] <a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/35100455">游戏的寻路导航 1：导航网格</a></li>
<li>[6] <a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_34132768/article/details/93762363">recastNavigation读书笔记1</a></li>
<li>[7] <a target="_blank" rel="noopener" href="http://critterai.org/projects/nmgen_study/overview.html">CritterAI</a></li>
<li>[8] <a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1uK4y1E7CV?from=search&seid=8637375892047322871">B站讲解RecastDemo如何使用</a></li>
<li>[9] <a target="_blank" rel="noopener" href="https://www.jianshu.com/p/64469a410b5d">从零开始学习导航网格</a></li>
<li>[10] <a target="_blank" rel="noopener" href="https://www.cnblogs.com/mfrbuaa/p/4073880.html">AABB&amp;OBB包围盒</a></li>
<li>[11] <a target="_blank" rel="noopener" href="https://blog.csdn.net/Kathy_unity/article/details/81583968">生成寻路网格的配置</a></li>
<li>[12] <a target="_blank" rel="noopener" href="https://arongranberg.com/astar/docs/createnavmesh.html">手动创建navmesh</a></li>
<li>[13] <a target="_blank" rel="noopener" href="https://arongranberg.com/astar/docs/recastgraph.html">navmesh参数</a></li>
<li>[14] <a target="_blank" rel="noopener" href="https://imzlp.com/posts/20203/">ue-navmesh</a></li>
<li>[15] <a target="_blank" rel="noopener" href="https://imzlp.com/posts/20203/">循迹研究室-Export Recast Navigation</a></li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2021/07/28/2020/2020-11-22-Recast/" data-id="ckrn3an7q002f20xwbuab8hi0" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Game/" rel="tag">Game</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/recast/" rel="tag">recast</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2021/07/28/2020/2020-11-25-go-debug/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          go-debug
        
      </div>
    </a>
  
  
    <a href="/2021/07/28/2020/2020-11-21-docker-custom-devenv/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">docker自定义环境</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/3D/" rel="tag">3D</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/AI/" rel="tag">AI</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Game/" rel="tag">Game</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Go/" rel="tag">Go</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Math/" rel="tag">Math</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Server/" rel="tag">Server</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Unreal-Engine4/" rel="tag">Unreal Engine4</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/" rel="tag">git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/golang/" rel="tag">golang</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/guitar/" rel="tag">guitar</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/node-js/" rel="tag">node.js</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/" rel="tag">protobuf</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/" rel="tag">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/recast/" rel="tag">recast</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/type/" rel="tag">type</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vscode/" rel="tag">vscode</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%BF%90%E7%BB%B4/" rel="tag">运维</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/3D/" style="font-size: 10px;">3D</a> <a href="/tags/AI/" style="font-size: 11.67px;">AI</a> <a href="/tags/C/" style="font-size: 15px;">C++</a> <a href="/tags/Game/" style="font-size: 18.33px;">Game</a> <a href="/tags/Go/" style="font-size: 13.33px;">Go</a> <a href="/tags/Linux/" style="font-size: 13.33px;">Linux</a> <a href="/tags/Math/" style="font-size: 11.67px;">Math</a> <a href="/tags/Server/" style="font-size: 16.67px;">Server</a> <a href="/tags/Unreal-Engine4/" style="font-size: 10px;">Unreal Engine4</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/golang/" style="font-size: 20px;">golang</a> <a href="/tags/guitar/" style="font-size: 10px;">guitar</a> <a href="/tags/node-js/" style="font-size: 10px;">node.js</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/recast/" style="font-size: 11.67px;">recast</a> <a href="/tags/redis/" style="font-size: 10px;">redis</a> <a href="/tags/type/" style="font-size: 10px;">type</a> <a href="/tags/vscode/" style="font-size: 10px;">vscode</a> <a href="/tags/%E8%BF%90%E7%BB%B4/" style="font-size: 16.67px;">运维</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/28/2021/2021-07-19-etcd-learn/">go-etcd阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-22-go-ethereum-learn/">go-ethereum阅读笔记</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-21-server%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/">server测试工具</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-06-09-pprof-doc/">go-pprof</a>
          </li>
        
          <li>
            <a href="/2021/07/28/2021/2021-04-19-c++-metaprogramming/">c++metaprogramming</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2021 Abel Sean<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>